﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BizCollegeWebApp.Models.CourseCompletionTest>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    TestIndex
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>TestIndex</h2>

<p>
    <%: Html.ActionLink("Create New", "CreateTest") %>
</p>
<table>
    <tr>
        <th>
            TestId
        </th>
        <th>
            CourseId
        </th>
        <th>
            Question
        </th>
        <th>
            Option1
        </th>
        <th>
            Option2
        </th>
        <th>
            Option3
        </th>
        <th>
            Option4
        </th>
        <th>
            Answer
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.TestId) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.CourseId) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Question) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Option1) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Option2) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Option3) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Option4) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Answer) %>
        </td>
        <td>
            <%: Html.ActionLink("Edit", "Edit", new { id=item.TestId }) %> |
            <%: Html.ActionLink("Details", "Details", new { id=item.TestId }) %> |
            <%: Html.ActionLink("Delete", "Delete", new { id=item.TestId }) %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>
